package com.yun.algorithmproblem.leetcode;

public class Leetcode342 {

    public static void main(String[] args) {
        Leetcode342 obj = new Leetcode342();
        int n = 5;
        System.out.println(obj.isPowerOfFour(n));
    }

    public boolean isPowerOfFour(int n) {
        return n > 0 && (n & (n - 1)) == 0 && (n & 0x55555555) != 0;
    }
}
